package com.cm.cl;

import javax.swing.JTable;
import javax.swing.table.TableModel;

public class ResultTable extends JTable {

	public ResultTable(TableModel dm) {
		super(dm);

		// 排序
		//this.setAutoCreateRowSorter(true);

		// 隐藏第一列(id)
		/*
		 * this.getColumnModel().getColumn(0).setMaxWidth(0);
		 * this.getColumnModel().getColumn(0).setMinWidth(0);
		 * this.getTableHeader().getColumnModel().getColumn(0).setMaxWidth(0);
		 * this.getTableHeader().getColumnModel().getColumn(0).setMinWidth(0);
		 */

		Util.FitTableColumns(this);

		this.setRowHeight(20);

	}

	

	/*
	 * @Override protected JTableHeader createDefaultTableHeader() {
	 * 
	 * return new JTableHeader(columnModel) { public String
	 * getToolTipText(MouseEvent e) { String tip = null; java.awt.Point p =
	 * e.getPoint(); int index = columnModel.getColumnIndexAtX(p.x); int
	 * realIndex = columnModel.getColumn(index).getModelIndex(); if (realIndex
	 * == 3) { tip = "点击评论"; } if (realIndex == 1) { tip = "点击下载附件"; } return
	 * tip; } }; }
	 */

}
